ValidatedInt

constructor(defaultValue: Int, range: IntRange, widgetType: ValidatedNumber.WidgetType = WidgetType.SLIDER)

A validated int number generated with an IntRange.

Author

fzzyhmstrs

Since

0.2.0

Parameters

defaultValue

Int. the default value of this wrapper

range

IntRange. the allowable range of this Validated Int

widgetType

WidgetType defines what the config GUI widget looks like


constructor(range: IntRange, widgetType: ValidatedNumber.WidgetType = WidgetType.SLIDER)

A validated int number with a default selected from the min of the allowable range.

Author

fzzyhmstrs

Since

0.2.0

Parameters

range

IntRange. the allowable range of this Validated Int

widgetType

WidgetType defines what the config GUI widget looks like


constructor(minValue: Int, maxValue: Int, widgetType: ValidatedNumber.WidgetType = WidgetType.SLIDER)

A validated int number with a default selected from the min of the allowable range.

Author

fzzyhmstrs

Since

0.2.0

Parameters

minValue

Int. the minimum allowed value, inclusive

maxValue

Int. the maximum allowed value, inclusive

widgetType

WidgetType defines what the config GUI widget looks like


constructor(defaultValue: Int)

An unbounded validated int number.

The validation will be limited to ensuring the value de/serializes as an int, since there are no bounds.

The widget type is locked to WidgetType.TEXTBOX

Author

fzzyhmstrs

Since

0.2.0

Parameters

defaultValue

Int. the default value of this wrapper


constructor()

An unbounded validated int number with default of 0.

The validation will be limited to ensuring the value de/serializes as an int, since there are no bounds.

The widget type is locked to WidgetType.TEXTBOX

Author

fzzyhmstrs

Since

0.2.0


constructor(defaultValue: Int, maxValue: Int, minValue: Int, widgetType: ValidatedNumber.WidgetType = if(maxValue == Int.MAX_VALUE || minValue == Int.MIN_VALUE) WidgetType.TEXTBOX else WidgetType.SLIDER)

Parameters

defaultValue

Int. the default value of this wrapper

maxValue

Int. the maximum allowed value, inclusive

minValue

Int. the minimum allowed value, inclusive